﻿		$(document).ready(function() {
			var but = $("button");
			var act = $("article");
			var wid = $("body").width();
			var hei = $("body").height();
		
			//but.css({"marginLeft":wid/2-100/2,"marginTop":50});

			but.click(function(){
				var sec = $("article section:nth-child(1)");
				sec.hide("fast","linear",function(){
					act.append($(this));
					$(this).css("display","block");
				})
			})

			// BEGIN IMAGES CAPTION
			
			var secHover = $("article section");
			var par = $("article section p");
			var parHeight = par.height()+15;
				par.css("bottom",-parHeight);

				secHover.hover(
					function(){
						par.addClass("active");
						$(this).find(".active").animate({"bottom":0},"fast","linear");
					},function(){
						par.animate({"bottom":-parHeight},"fast","linear");
						par.removeClass("active");
					})
		});

